<?php
	@session_start();
	require_once('class/signup.class.php');
	$signup=new Signup();
	
	$signup->setEmail($_POST['it_text_email']);
	$signup->setPassword($_POST['it_password_password']);
	$signup->setFirstName($_POST['it_text_firstname']);
	$signup->setLastName($_POST['it_text_lastname']);
	$id=$signup->save();

	
	if($id!=false)
	{
		$_SESSION['userId']	= $id;
		$_SESSION['ipAddress'] = $_SERVER['REMOTE_ADDR'];
		header('Location: ../editProfile.php');
	}
	header('Location: ../post/post_topic.php');
?>